<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>RPMsg-Lite User&#39;s Guide: RPMsg-Lite Core Component</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">RPMsg-Lite User&#39;s Guide
   &#160;<span id="projectnumber">Rev. 1.2</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__rpmsg__lite.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">RPMsg-Lite Core Component</div>  </div>
</div><!--header-->
<div class="contents">

<p>This section describes the RPMsg-Lite core component that allows:  
<a href="#details">More...</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<p>This section describes the RPMsg-Lite core component that allows: </p>
<ul>
<li>Callback based reception.</li>
<li>Blocking send functionality.</li>
<li>Zero-copy send functionality. </li>
</ul>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:structrpmsg__lite__endpoint"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a></td></tr>
<tr class="separator:structrpmsg__lite__endpoint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structrpmsg__lite__ept__static__context"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__ept__static__context">rpmsg_lite_ept_static_context</a></td></tr>
<tr class="separator:structrpmsg__lite__ept__static__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structrpmsg__lite__instance"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a></td></tr>
<tr class="separator:structrpmsg__lite__instance"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga96a544c91ab6dd353867256e1deb9917"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#ga96a544c91ab6dd353867256e1deb9917">RL_VERSION</a></td></tr>
<tr class="separator:ga96a544c91ab6dd353867256e1deb9917"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga267570e79fefba2931b08a58d0ad917e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga267570e79fefba2931b08a58d0ad917e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_WORD_SIZE</b></td></tr>
<tr class="separator:ga267570e79fefba2931b08a58d0ad917e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga720820fcd5a12df1ac13245d5308a4c8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga720820fcd5a12df1ac13245d5308a4c8"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_WORD_ALIGN_UP</b>(a)                                                                                                                                                                </td></tr>
<tr class="separator:ga720820fcd5a12df1ac13245d5308a4c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae1b71b6f1487a5662e32f7a5ec9150d4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae1b71b6f1487a5662e32f7a5ec9150d4"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_WORD_ALIGN_DOWN</b>(a)                                                                                                                                                </td></tr>
<tr class="separator:gae1b71b6f1487a5662e32f7a5ec9150d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13a8e0903b54495e9a33241d03bbfb47"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga13a8e0903b54495e9a33241d03bbfb47"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_SUCCESS</b></td></tr>
<tr class="separator:ga13a8e0903b54495e9a33241d03bbfb47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5f78659bc25fce23f4274fb1d62a42c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5f78659bc25fce23f4274fb1d62a42c9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_NULL</b></td></tr>
<tr class="separator:ga5f78659bc25fce23f4274fb1d62a42c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21fb50e285d91ee553b37ed858aa0302"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga21fb50e285d91ee553b37ed858aa0302"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_REMOTE</b></td></tr>
<tr class="separator:ga21fb50e285d91ee553b37ed858aa0302"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga58a656b3bd10dcc25306d051113f5c30"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga58a656b3bd10dcc25306d051113f5c30"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_MASTER</b></td></tr>
<tr class="separator:ga58a656b3bd10dcc25306d051113f5c30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac7eb86ebf1a5b5954f724d66c4937a90"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac7eb86ebf1a5b5954f724d66c4937a90"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_TRUE</b></td></tr>
<tr class="separator:gac7eb86ebf1a5b5954f724d66c4937a90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab9c174250e3a4c1f51d9371c3842ad31"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab9c174250e3a4c1f51d9371c3842ad31"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_FALSE</b></td></tr>
<tr class="separator:gab9c174250e3a4c1f51d9371c3842ad31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga008641695ba0de89008e7e87c0abbd11"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga008641695ba0de89008e7e87c0abbd11"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_ADDR_ANY</b></td></tr>
<tr class="separator:ga008641695ba0de89008e7e87c0abbd11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga544813da8a32f3b1212612198432c3e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga544813da8a32f3b1212612198432c3e5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_RELEASE</b></td></tr>
<tr class="separator:ga544813da8a32f3b1212612198432c3e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf82e3df072be54083a6b97d69c398805"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf82e3df072be54083a6b97d69c398805"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_HOLD</b></td></tr>
<tr class="separator:gaf82e3df072be54083a6b97d69c398805"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga962eb9fa88a9a649b319e7cebd2ff484"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga962eb9fa88a9a649b319e7cebd2ff484"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_DONT_BLOCK</b></td></tr>
<tr class="separator:ga962eb9fa88a9a649b319e7cebd2ff484"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9fa9e3f383362e932f2dc98d09e91350"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9fa9e3f383362e932f2dc98d09e91350"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_BLOCK</b></td></tr>
<tr class="separator:ga9fa9e3f383362e932f2dc98d09e91350"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9b5604fa76df1fb282c7cc1a050f8cac"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9b5604fa76df1fb282c7cc1a050f8cac"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_ERRORS_BASE</b></td></tr>
<tr class="separator:ga9b5604fa76df1fb282c7cc1a050f8cac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9415fd1584985438d979a8e32576c4d8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9415fd1584985438d979a8e32576c4d8"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_ERR_NO_MEM</b></td></tr>
<tr class="separator:ga9415fd1584985438d979a8e32576c4d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga767a6b68a3e4d0d2a275e3436cf413ab"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga767a6b68a3e4d0d2a275e3436cf413ab"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_ERR_BUFF_SIZE</b></td></tr>
<tr class="separator:ga767a6b68a3e4d0d2a275e3436cf413ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae85355e0c2198eeff5f75c45d207485f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae85355e0c2198eeff5f75c45d207485f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_ERR_PARAM</b></td></tr>
<tr class="separator:gae85355e0c2198eeff5f75c45d207485f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab059442a24f3617e1df871a4fb7e2811"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab059442a24f3617e1df871a4fb7e2811"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_ERR_DEV_ID</b></td></tr>
<tr class="separator:gab059442a24f3617e1df871a4fb7e2811"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad0c253824df699e944e497f8de7392cb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad0c253824df699e944e497f8de7392cb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_ERR_MAX_VQ</b></td></tr>
<tr class="separator:gad0c253824df699e944e497f8de7392cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6d989b855b6f9dcdc7620709c868bc2c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6d989b855b6f9dcdc7620709c868bc2c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_ERR_NO_BUFF</b></td></tr>
<tr class="separator:ga6d989b855b6f9dcdc7620709c868bc2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64d09b4e17f7114cc638344126435410"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga64d09b4e17f7114cc638344126435410"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_NOT_READY</b></td></tr>
<tr class="separator:ga64d09b4e17f7114cc638344126435410"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35bfe5b0aec1dd39a1c05c3ff77508ae"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga35bfe5b0aec1dd39a1c05c3ff77508ae"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_ALREADY_DONE</b></td></tr>
<tr class="separator:ga35bfe5b0aec1dd39a1c05c3ff77508ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga006151a658954fcaa252aa787835c25d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga006151a658954fcaa252aa787835c25d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_NO_FLAGS</b></td></tr>
<tr class="separator:ga006151a658954fcaa252aa787835c25d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga56f3f1cc5f980976ed1ab0d3ff59109a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga56f3f1cc5f980976ed1ab0d3ff59109a"></a>
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#ga56f3f1cc5f980976ed1ab0d3ff59109a">rl_ept_rx_cb_t</a>) (void *payload, int payload_len, unsigned long src, void *priv)</td></tr>
<tr class="memdesc:ga56f3f1cc5f980976ed1ab0d3ff59109a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive callback function type. <br /></td></tr>
<tr class="separator:ga56f3f1cc5f980976ed1ab0d3ff59109a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga6ceae6c968214f8aa26be31ff1f4fc58"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#ga6ceae6c968214f8aa26be31ff1f4fc58">rpmsg_lite_master_init</a> (void *shmem_addr, size_t shmem_length, int link_id, uint32_t init_flags)</td></tr>
<tr class="memdesc:ga6ceae6c968214f8aa26be31ff1f4fc58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the RPMsg-Lite communication stack. Must be called prior to any other RPMSG lite API. To be called by the master side.  <a href="#ga6ceae6c968214f8aa26be31ff1f4fc58">More...</a><br /></td></tr>
<tr class="separator:ga6ceae6c968214f8aa26be31ff1f4fc58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf6d18dec47cdd58d56505e39cf010991"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#gaf6d18dec47cdd58d56505e39cf010991">rpmsg_lite_remote_init</a> (void *shmem_addr, int link_id, uint32_t init_flags)</td></tr>
<tr class="memdesc:gaf6d18dec47cdd58d56505e39cf010991"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the RPMsg-Lite communication stack. Must be called prior to any other RPMsg-Lite API. To be called by the remote side.  <a href="#gaf6d18dec47cdd58d56505e39cf010991">More...</a><br /></td></tr>
<tr class="separator:gaf6d18dec47cdd58d56505e39cf010991"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf206cb6dd21a08b56495e02045afd364"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#gaf206cb6dd21a08b56495e02045afd364">rpmsg_lite_deinit</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev)</td></tr>
<tr class="memdesc:gaf206cb6dd21a08b56495e02045afd364"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deinitialized the RPMsg-Lite communication stack This function always succeeds. rpmsg_lite_init() can be called again after this function has been called.  <a href="#gaf206cb6dd21a08b56495e02045afd364">More...</a><br /></td></tr>
<tr class="separator:gaf206cb6dd21a08b56495e02045afd364"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf9bf28acdd0143208f6e160dbb879fd3"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#gaf9bf28acdd0143208f6e160dbb879fd3">rpmsg_lite_create_ept</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev, unsigned long addr, <a class="el" href="group__rpmsg__lite.html#ga56f3f1cc5f980976ed1ab0d3ff59109a">rl_ept_rx_cb_t</a> rx_cb, void *rx_cb_data)</td></tr>
<tr class="memdesc:gaf9bf28acdd0143208f6e160dbb879fd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new rpmsg endpoint, which can be used for communication.  <a href="#gaf9bf28acdd0143208f6e160dbb879fd3">More...</a><br /></td></tr>
<tr class="separator:gaf9bf28acdd0143208f6e160dbb879fd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae48a5cce278d2b4dd73415ba3e1fb74e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#gae48a5cce278d2b4dd73415ba3e1fb74e">rpmsg_lite_destroy_ept</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev, struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a> *rl_ept)</td></tr>
<tr class="memdesc:gae48a5cce278d2b4dd73415ba3e1fb74e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function deletes rpmsg endpoint and performs cleanup.  <a href="#gae48a5cce278d2b4dd73415ba3e1fb74e">More...</a><br /></td></tr>
<tr class="separator:gae48a5cce278d2b4dd73415ba3e1fb74e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga01e7c97d49c0969ec17783b8643b9f90"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#ga01e7c97d49c0969ec17783b8643b9f90">rpmsg_lite_send</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev, struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a> *ept, unsigned long dst, char *data, unsigned long size, unsigned long timeout)</td></tr>
<tr class="memdesc:ga01e7c97d49c0969ec17783b8643b9f90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a message contained in data field of length size to the remote endpoint with address dst. ept-&gt;addr is used as source address in the rpmsg header of the message being sent.  <a href="#ga01e7c97d49c0969ec17783b8643b9f90">More...</a><br /></td></tr>
<tr class="separator:ga01e7c97d49c0969ec17783b8643b9f90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga94c14298cb3bc8d2e16d6115129eef01"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#ga94c14298cb3bc8d2e16d6115129eef01">rpmsg_lite_is_link_up</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev)</td></tr>
<tr class="memdesc:ga94c14298cb3bc8d2e16d6115129eef01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to get the link state.  <a href="#ga94c14298cb3bc8d2e16d6115129eef01">More...</a><br /></td></tr>
<tr class="separator:ga94c14298cb3bc8d2e16d6115129eef01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f19532c1c3dd69f6bd5a515b06eb9c4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#ga4f19532c1c3dd69f6bd5a515b06eb9c4">rpmsg_lite_release_rx_buffer</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev, void *rxbuf)</td></tr>
<tr class="memdesc:ga4f19532c1c3dd69f6bd5a515b06eb9c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases the rx buffer for future reuse in vring. This API can be called at process context when the message in rx buffer is processed.  <a href="#ga4f19532c1c3dd69f6bd5a515b06eb9c4">More...</a><br /></td></tr>
<tr class="separator:ga4f19532c1c3dd69f6bd5a515b06eb9c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaafaf83655850247f8408ab8a17a6e557"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#gaafaf83655850247f8408ab8a17a6e557">rpmsg_lite_alloc_tx_buffer</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev, unsigned long *size, unsigned long timeout)</td></tr>
<tr class="memdesc:gaafaf83655850247f8408ab8a17a6e557"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates the tx buffer for message payload.  <a href="#gaafaf83655850247f8408ab8a17a6e557">More...</a><br /></td></tr>
<tr class="separator:gaafaf83655850247f8408ab8a17a6e557"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0b73b2e4fea12db016eba6b9ffa80861"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__lite.html#ga0b73b2e4fea12db016eba6b9ffa80861">rpmsg_lite_send_nocopy</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev, struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a> *ept, unsigned long dst, void *data, unsigned long size)</td></tr>
<tr class="memdesc:ga0b73b2e4fea12db016eba6b9ffa80861"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a message in tx buffer allocated by <a class="el" href="group__rpmsg__lite.html#gaafaf83655850247f8408ab8a17a6e557" title="Allocates the tx buffer for message payload. ">rpmsg_lite_alloc_tx_buffer()</a>  <a href="#ga0b73b2e4fea12db016eba6b9ffa80861">More...</a><br /></td></tr>
<tr class="separator:ga0b73b2e4fea12db016eba6b9ffa80861"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<hr/><h2 class="groupheader">Class Documentation</h2>
<a name="structrpmsg__lite__endpoint" id="structrpmsg__lite__endpoint"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct rpmsg_lite_endpoint</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>RPMsg Lite Endpoint structure </p>
</div><table class="fieldtable">
<tr><th colspan="3">Class Members</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a28c0e9a7a70fbc58a497f2d3fac96f70"></a>unsigned long</td>
<td class="fieldname">
addr</td>
<td class="fielddoc">
<p>endpoint address </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a457c132df214a78150ae4525b6100700"></a><a class="el" href="group__rpmsg__lite.html#ga56f3f1cc5f980976ed1ab0d3ff59109a">rl_ept_rx_cb_t</a></td>
<td class="fieldname">
rx_cb</td>
<td class="fielddoc">
<p>ISR callback function </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a30e868937950060fbcce818a2bc35db8"></a>void *</td>
<td class="fieldname">
rx_cb_data</td>
<td class="fielddoc">
<p>ISR callback data </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="adae527c972c102f433354448d3ab05a7"></a>void *</td>
<td class="fieldname">
rfu</td>
<td class="fielddoc">
<p>reserved for future usage </p>
</td></tr>
</table>

</div>
</div>
<a name="structrpmsg__lite__ept__static__context" id="structrpmsg__lite__ept__static__context"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct rpmsg_lite_ept_static_context</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>RPMsg Lite Endpoint static context </p>
</div><table class="fieldtable">
<tr><th colspan="3">Class Members</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a4cbac751c0f2b20768136c31610906f8"></a>struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a></td>
<td class="fieldname">
ept</td>
<td class="fielddoc">
<p>memory for endpoint structure </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aac24ffeec310481457938c02b916c426"></a>struct llist</td>
<td class="fieldname">
node</td>
<td class="fielddoc">
<p>memory for linked list node structure </p>
</td></tr>
</table>

</div>
</div>
<a name="structrpmsg__lite__instance" id="structrpmsg__lite__instance"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct rpmsg_lite_instance</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>Structure describing the local instance of RPMSG lite communication stack and holds all runtime variables needed internally by the stack. </p>
</div><table class="fieldtable">
<tr><th colspan="3">Class Members</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a3bf53c7a9d4a0fbfd6ec924a19f7e7b8"></a>struct virtqueue *</td>
<td class="fieldname">
rvq</td>
<td class="fielddoc">
<p>receive virtqueue </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ae1d9d59636e550051ebce42bd0b58816"></a>struct virtqueue *</td>
<td class="fieldname">
tvq</td>
<td class="fielddoc">
<p>transmit virtqueue </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a50ba617e06016bb1ca0d1a4dd7d0ac65"></a>struct llist *</td>
<td class="fieldname">
rl_endpoints</td>
<td class="fielddoc">
<p>linked list of endpoints </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab4f1d8d26a8fed002f3e113cb988b1a8"></a>LOCK *</td>
<td class="fieldname">
lock</td>
<td class="fielddoc">
<p>local RPMsg Lite mutex lock </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab4fb1dac3c1924deba08c38ee6cb828b"></a>unsigned int</td>
<td class="fieldname">
link_state</td>
<td class="fielddoc">
<p>state of the link, up/down </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a79ea96087bf1897ccfd3eb2bccf2d78b"></a>char *</td>
<td class="fieldname">
sh_mem_base</td>
<td class="fielddoc">
<p>base address of the shared memory </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab2ce5bdfa263cdffc6563997e25acd50"></a>unsigned int</td>
<td class="fieldname">
sh_mem_remaining</td>
<td class="fielddoc">
<p>remaining free bytes of shared memory </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a17ae507517bfe8f585893b5f61b953f6"></a>unsigned int</td>
<td class="fieldname">
sh_mem_total</td>
<td class="fielddoc">
<p>total size of shared memory </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a0004491e023ed2e999182ba302fa32e5"></a>struct virtqueue_ops const *</td>
<td class="fieldname">
vq_ops</td>
<td class="fielddoc">
<p>ops functions table pointer </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga96a544c91ab6dd353867256e1deb9917"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RL_VERSION</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Current RPMsg Lite version </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga6ceae6c968214f8aa26be31ff1f4fc58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a>* rpmsg_lite_master_init </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>shmem_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>shmem_length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>link_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>init_flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the RPMsg-Lite communication stack. Must be called prior to any other RPMSG lite API. To be called by the master side. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shmem_addr</td><td>Shared memory base used for this instance of RPMsg-Lite </td></tr>
    <tr><td class="paramname">shmem_length</td><td>Length of memory area given by previous parameter </td></tr>
    <tr><td class="paramname">link_id</td><td>Link ID used to define the rpmsg-lite instance, see rpmsg_platform.h </td></tr>
    <tr><td class="paramname">init_flags</td><td>Initialization flags </td></tr>
    <tr><td class="paramname">static_context</td><td>RPMsg-Lite preallocated context pointer, used in case of static api (RL_USE_STATIC_API)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>New RPMsg-Lite instance pointer or NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf6d18dec47cdd58d56505e39cf010991"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a>* rpmsg_lite_remote_init </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>shmem_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>link_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>init_flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the RPMsg-Lite communication stack. Must be called prior to any other RPMsg-Lite API. To be called by the remote side. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shmem_addr</td><td>Shared memory base used for this instance of RPMsg-Lite </td></tr>
    <tr><td class="paramname">link_id</td><td>Link ID used to define the rpmsg-lite instance, see rpmsg_platform.h </td></tr>
    <tr><td class="paramname">init_flags</td><td>Initialization flags</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>New RPMsg-Lite instance pointer or NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf206cb6dd21a08b56495e02045afd364"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rpmsg_lite_deinit </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deinitialized the RPMsg-Lite communication stack This function always succeeds. rpmsg_lite_init() can be called again after this function has been called. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of function execution, RL_SUCCESS on success. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf9bf28acdd0143208f6e160dbb879fd3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a>* rpmsg_lite_create_ept </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__rpmsg__lite.html#ga56f3f1cc5f980976ed1ab0d3ff59109a">rl_ept_rx_cb_t</a>&#160;</td>
          <td class="paramname"><em>rx_cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>rx_cb_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new rpmsg endpoint, which can be used for communication. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance </td></tr>
    <tr><td class="paramname">addr</td><td>Desired address, RL_ADDR_ANY for automatic selection </td></tr>
    <tr><td class="paramname">rx_cb</td><td>Callback function called on receive </td></tr>
    <tr><td class="paramname">rx_cb_data</td><td>Callback data pointer, passed to rx_cb </td></tr>
    <tr><td class="paramname">ept_context</td><td>Endpoint preallocated context pointer, used in case of static api (RL_USE_STATIC_API)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>RL_NULL on error, new endpoint pointer on success. </dd></dl>

</div>
</div>
<a class="anchor" id="gae48a5cce278d2b4dd73415ba3e1fb74e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rpmsg_lite_destroy_ept </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a> *&#160;</td>
          <td class="paramname"><em>rl_ept</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function deletes rpmsg endpoint and performs cleanup. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance </td></tr>
    <tr><td class="paramname">rl_ept</td><td>Pointer to endpoint to destroy </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga01e7c97d49c0969ec17783b8643b9f90"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rpmsg_lite_send </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a> *&#160;</td>
          <td class="paramname"><em>ept</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a message contained in data field of length size to the remote endpoint with address dst. ept-&gt;addr is used as source address in the rpmsg header of the message being sent. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance </td></tr>
    <tr><td class="paramname">ept</td><td>Sender endpoint </td></tr>
    <tr><td class="paramname">dst</td><td>Remote endpoint address </td></tr>
    <tr><td class="paramname">data</td><td>Payload buffer </td></tr>
    <tr><td class="paramname">size</td><td>Size of payload, in bytes </td></tr>
    <tr><td class="paramname">timeout</td><td>Timeout in ms, 0 if nonblocking</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of function execution, RL_SUCCESS on success. </dd></dl>

</div>
</div>
<a class="anchor" id="ga94c14298cb3bc8d2e16d6115129eef01"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rpmsg_lite_is_link_up </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function to get the link state. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True when link up, false when down. </dd></dl>

</div>
</div>
<a class="anchor" id="ga4f19532c1c3dd69f6bd5a515b06eb9c4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rpmsg_lite_release_rx_buffer </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>rxbuf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Releases the rx buffer for future reuse in vring. This API can be called at process context when the message in rx buffer is processed. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance </td></tr>
    <tr><td class="paramname">rxbuf</td><td>Rx buffer with message payload</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of function execution, RL_SUCCESS on success. </dd></dl>

</div>
</div>
<a class="anchor" id="gaafaf83655850247f8408ab8a17a6e557"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* rpmsg_lite_alloc_tx_buffer </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long *&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocates the tx buffer for message payload. </p>
<p>This API can only be called at process context to get the tx buffer in vring. By this way, the application can directly put its message into the vring tx buffer without copy from an application buffer. It is the application responsibility to correctly fill the allocated tx buffer by data and passing correct parameters to the <a class="el" href="group__rpmsg__lite.html#ga0b73b2e4fea12db016eba6b9ffa80861" title="Sends a message in tx buffer allocated by rpmsg_lite_alloc_tx_buffer() ">rpmsg_lite_send_nocopy()</a> function to perform data no-copy-send mechanism.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Pointer to store maximum payload size available </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timeout</td><td>Integer, wait upto timeout ms or not for buffer to become available</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The tx buffer address on success and NULL on failure.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__rpmsg__lite.html#ga0b73b2e4fea12db016eba6b9ffa80861" title="Sends a message in tx buffer allocated by rpmsg_lite_alloc_tx_buffer() ">rpmsg_lite_send_nocopy</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga0b73b2e4fea12db016eba6b9ffa80861"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rpmsg_lite_send_nocopy </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a> *&#160;</td>
          <td class="paramname"><em>ept</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a message in tx buffer allocated by <a class="el" href="group__rpmsg__lite.html#gaafaf83655850247f8408ab8a17a6e557" title="Allocates the tx buffer for message payload. ">rpmsg_lite_alloc_tx_buffer()</a> </p>
<p>This function sends txbuf of length len to the remote dst address, and uses ept-&gt;addr as the source address. The application has to take the responsibility for:</p><ol type="1">
<li>tx buffer allocation (<a class="el" href="group__rpmsg__lite.html#gaafaf83655850247f8408ab8a17a6e557" title="Allocates the tx buffer for message payload. ">rpmsg_lite_alloc_tx_buffer()</a>)</li>
<li>filling the data to be sent into the pre-allocated tx buffer</li>
<li>not exceeding the buffer size when filling the data</li>
<li>data cache coherency</li>
</ol>
<p>After the <a class="el" href="group__rpmsg__lite.html#ga0b73b2e4fea12db016eba6b9ffa80861" title="Sends a message in tx buffer allocated by rpmsg_lite_alloc_tx_buffer() ">rpmsg_lite_send_nocopy()</a> function is issued the tx buffer is no more owned by the sending task and must not be touched anymore unless the <a class="el" href="group__rpmsg__lite.html#ga0b73b2e4fea12db016eba6b9ffa80861" title="Sends a message in tx buffer allocated by rpmsg_lite_alloc_tx_buffer() ">rpmsg_lite_send_nocopy()</a> function fails and returns an error.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ept</td><td>Sender endpoint pointer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst</td><td>Destination address </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>TX buffer with message filled </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Length of payload</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success and an appropriate error value on failure.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__rpmsg__lite.html#gaafaf83655850247f8408ab8a17a6e557" title="Allocates the tx buffer for message payload. ">rpmsg_lite_alloc_tx_buffer</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
